﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="webset.aspx.cs"
    Inherits="weikeweixin.web.admin.website.webset" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="Keywords" content="IdeaSoft软件" />
    <meta name="Description" content="IdeaSoft软件" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/bootstrap.min.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/bootstrap.responsive.min.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/style.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/todc_bootstrap.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/themes.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/inside.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/resource.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/datepicker.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/css/Bootstrap/daterangepicker.css?v=<%=Application["v"] %>" />
    <link rel="stylesheet" type="text/css" href="/Scripts/colorChoose/css/jquery.bigcolorpicker.css?v=<%=Application["v"] %>" />
    <script type="text/javascript" src="/Scripts/JQuery.min.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/JQuery.cookie.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/JQuery.form.min.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/JQuery.form.wizard.min.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/Bootstrap.min.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/JQuery.validate.min.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/JQuery.validate.methods.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/Inside.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/UploadImg.js?v=<%=Application["v"] %>"></script>
    <script type="text/javascript" src="/Scripts/colorChoose/js/jquery.bigcolorpicker.js?v=<%=Application["v"] %>"></script>
    <title>IdeaSoft软件</title>
</head>
<body>
    <div id="main">
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    <div class="box">
                        <div class="box-title">
                            <div class="span12">
                                <h3>
                                    <i class="icon-cog"></i>微官网设置</h3>
                                <a class="btn preview pull-right btn-success" href="javascript:;">官网预览</a>
                                <script type="text/javascript">
                                    $("a.preview").click(function () {
                                        if ($.browser.msie) {
                                            alert("不支持在IE浏览器下预览，建议使用谷歌浏览器或者360极速浏览器或者直接在微信上预览。");
                                            return;
                                        }

                                        var top = ($(window.parent.parent).height() - 480) / 2;
                                        var left = ($(window.parent.parent).width() - 320) / 2;
                                        var previewUrl = "http://" + window.location.host + "/phone/home?userid=" + "<%=user_id %>";

                                        window.open(previewUrl, "我的微官网", "height=480,width=320,top=" + top + ",left=" + left + ",toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no");
                                    });
                                </script>
                            </div>
                        </div>
                        <div class="box-content">
                            <form action="webset.aspx" method="post" class="form-horizontal form-validate">
                            <input type="hidden" name="action" value="bindtmerchant" />
                            <div class="control-group">
                                <label class="control-label" for="title">
                                    官网标题：</label>
                                <div class="controls">
                                    <input type="text" name="title" id="title" value="<%=MName %>" class="input-xlarge"
                                        data-rule-required="true" data-rule-maxlength="50" /><span class="maroon">*</span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="keyword">
                                    触发官网关键词:</label>
                                <div class="controls">
                                    <input type="text" name="keyword" id="keyword" class="input-xlarge" value="<%=KeyWords %>"
                                        data-rule-required="true" data-rule-maxlength="100" />
                                    <span class="maroon">*</span><span class="help-inline">多个关键字请用空格分开</span>
                                </div>
                            </div>
                            <div class="control-group" style="display: none;">
                                <label class="control-label" for="caption">
                                    图文消息标题：</label>
                                <div class="controls">
                                    <input type="text" name="caption" id="caption" value="" class="input-xlarge" data-rule-required="true" />
                                    <span class="help-inline">发送关键词后返回的图文消息标题</span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="cover">
                                    图文消息封面</label>
                                <div class="controls">
                                    <img class="thumb_img" id="coverimg" src="<%=CoverImg %>" style="max-height: 100px;" />
                                    <input id="thumb" type="text" name="cover" class="hide" value="<%=CoverImg %>" />
                                    <span class="help-inline">
                                        <button class="btn select_img" id="select_cover_img" type="button">
                                            选择封面</button>
                                        <span class="help-inline">建议尺寸：宽720像素，高400像素</span> </span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="brief">
                                    图文消息简介</label>
                                <div class="controls">
                                    <textarea id="brief" name="brief" class="input-xlarge ui-wizard-content ui-helper-reset ui-state-default"
                                        style="resize: none; width: 274px; height: 120px;" data-rule-required="true"
                                        data-rule-maxlength="255"><%=Description %></textarea><span class="maroon">*</span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="cover">
                                    官网logo</label>
                                <div class="controls">
                                    <img class="thumb_img" id="logoimg" src="<%=HomeShareImg %>" style="max-height: 100px;" />
                                    <input type="text" name="logo" id="logo" class="hide" value="<%=HomeShareImg %>" />
                                    <span class="help-inline">
                                        <button class="btn select_img" type="button" id="select_logo_img">
                                            选择logo</button>
                                        <span class="help-inline">建议尺寸：宽420像素，高60像素的png图片</span> </span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="bg_img">
                                    官网背景</label>
                                <div class="controls">
                                    <img class="gwbg thumb_img" id="homeimg" src="<%=HomeBgImg %>" style="max-height: 100px;" />
                                    <input class="input-xlarge" type="text" name="show_bg_img" id="bg_img" value="<%=HomeBgImg %>"
                                        style="display: none;" />
                                    <span class="help-inline">
                                        <button id="select_bg_img" class="btn select_img" type="button">
                                            自定义</button>
                                        建议大小(宽640高960) </span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="select_bg">
                                    选择已有的官网背景</label>
                                <div class="controls">
                                    <select name="bg_img" id="select_bg" class="input-medium">
                                        <option value="">选择官网背景图片</option>
                                        <option value="styles/images/home-default10.jpg">01</option>
                                        <option value="styles/images/home-default11.jpg">02</option>
                                        <option value="styles/images/home-default12.jpg">03</option>
                                        <option value="styles/images/home-default13.jpg">04</option>
                                        <option value="styles/images/home-default14.jpg">05</option>
                                        <option value="styles/images/home-default15.jpg">06</option>
                                        <option value="styles/images/home-default16.jpg">07</option>
                                        <option value="styles/images/home-default17.jpg">08</option>
                                        <option value="styles/images/home-default18.jpg">09</option>
                                        <option value="styles/images/home-default19.jpg">10</option>
                                        <option value="styles/images/home-default20.jpg">11</option>
                                        <option value="styles/images/home-default21.jpg">12</option>
                                    </select>
                                    <span class="help-inline">以预览背景图为标准</span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="location_p">
                                    地址</label>
                                <div class="controls">
                                    <select name="location_p" id="location_p">
                                    </select>
                                    <select name="location_c" id="location_c">
                                    </select>
                                    <select name="location_a" id="location_a">
                                    </select>
                                    <script type="text/javascript" src="../../../scripts/select.Region.js"></script>
                                    <script type="text/javascript">
                                        new PCAS("location_p", "location_c", "location_a", '<%=Province %>', '<%=City %>', '<%=Area %>');
                                    </script>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="fanslocal">
                                    联系方式</label>
                                <div class="controls">
                                    <input type="text" name="phone" id="phone" value="<%=MPhone %>" data-rule-required="true"
                                        data-rule-phone="true" />
                                    <span class="maroon">*</span> <span class="help-inline"></span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="fanslocal">
                                    底部版权</label>
                                <div class="controls">
                                    <input type="text" name="copyright" id="copyright" value="<%=CopyRight %>" data-rule-required="true"
                                        data-rule-maxlength="100" style="width: 300px" />
                                    <span class="maroon">*</span> <span class="help-inline"></span>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">
                                    底部字体颜色</label>
                                <div class="controls inline">
                                    <input type="text" name="cname_color" id="cname_color" value="<%=FontColor %>" style="background-color: <%=FontColor %>;"
                                        class="input-mini color" onblur="document.getElementById('cname_color').style.backgroundColor=document.getElementById('cname_color').value;">
                                </div>
                            </div>
                            <input type="hidden" name="id" value="8620">
                            <div class="form-actions">
                                <button id="bsubmit" type="submit" data-loading-text="提交中..." class="btn btn-primary">
                                    保存</button>
                            </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
    window.document.onkeydown = function (e) {
        if ('' == document.activeElement.id) {
            var e = e || event;
            var currKey = e.keyCode || e.which || e.charCode;
            if (8 == currKey) {
                return false;
            }
        }
    };
    $("#select_bg").change(function () {
        var v = $(this).val();
        if (v.length > 0) {
            $("img.gwbg").attr("src", v)
            $("#bg_img").val(v);
        }
    })
    $(function () {
        $("#select_logo_img").initUpload({ showID: 'logoimg', hideID: 'logo', savePath: 't_setInfo&dir=image' });
        $("#select_bg_img").initUpload({ showID: 'homeimg', hideID: 'bg_img', savePath: 't_setInfo&dir=image' });
        $("#select_cover_img").initUpload({ showID: 'coverimg', hideID: 'thumb', savePath: 't_setInfo&dir=image' });
        $("#cname_color").bigColorpicker("cname_color");
    })
</script>
